package com.lemon1;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class TestXmppActivity extends Activity {

	public static EditText apikey;
//	public static EditText xmpphost;
//	public static EditText xmppport;
//	public static EditText xmppUserName;
//	public static EditText xmppPassword;
//	public static TextView xmppResult;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.testxmpp);
		apikey = (EditText) findViewById(R.id.apikey);
//		xmpphost = (EditText) findViewById(R.id.xmpphost);
//		xmppport = (EditText) findViewById(R.id.xmppport);
//		xmppUserName = (EditText) findViewById(R.id.xmpp_username);
//		xmppPassword = (EditText) findViewById(R.id.xmpp_password);
//
//		xmppResult = (TextView) findViewById(R.id.xmpp_result);

		Button btn = (Button) findViewById(R.id.btnOK);
		btn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				onOk();
			}
		});
		btn = (Button) findViewById(R.id.btnClear);
		btn.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				onClear();
			}
		});
	}
	
	void onOk(){
		Constants.ShieldingPhoneNumbers.add(apikey.getEditableText().toString());
		apikey.setText("");
//		Constants.XMPP_HOST = xmpphost.getEditableText().toString();
//		Constants.XMPP_PORT = xmppport.getEditableText().toString();
//		Constants.XMPP_USERNAME = xmppUserName.getEditableText().toString();
//		Constants.XMPP_PASSWORD = xmppPassword.getEditableText().toString();
		
	}
	
	void onClear(){
		apikey.setText("");
//		xmpphost.setText("");
//		xmppport.setText("");
//		xmppUserName.setText("");
//		xmppPassword.setText("");
//		xmppResult.setText("");
	}
	
//	public static void putInformation(String info){
//		xmppResult.setText(info);
//	}
}
